#ifndef UNMANEDSUPERMARKETSYS_H
#define UNMANEDSUPERMARKETSYS_H

#include <QMainWindow>
//创建main.h
#include <main.h>
#include <QTcpServer>
#include <QTcpSocket>
#include <QDateTime>
namespace Ui {
class unmanedsupermarketsys;
}

class unmanedsupermarketsys : public QMainWindow
{
    Q_OBJECT

public:
    explicit unmanedsupermarketsys(QWidget *parent = 0);
    ~unmanedsupermarketsys();

   // 连接主窗口的 windowClosed() 信号到槽函数



private slots:
    void onWindowClosed();
    void startup();
    void Server_connectSucceed();

    void timeUpdate();

    void read_ServerData();
    void connectSucceed();
    void recv_client_Data();
    void disConnect();
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
private:
    Ui::unmanedsupermarketsys *ui;
    QTcpSocket *tcpSocket;
    QTcpServer *tcpServer;
//=============timer=============
    QTimer      *timer;
    QDateTime   dateTime;
//================host,ip===========

//============image display =============
    QVector<QString> srcs;
    QVector<QString> prices;
    QVector<QString> weigths;
    QVector<QString> times;
    int ishide[6] = {0};
    //=======================鼠标拖动==============
    bool m_dragging;
    QPoint m_lastPos;
//    setting *mainWindow = new setting(this);
};

#endif // UNMANEDSUPERMARKETSYS_H
